import request from '../axios'

/**
 * 所有文章列表
 */
export function login(data) {
    return request({
        url: 'login/login',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        }
    })
}

/**
 * 发送验证码
 */
export function sendVerify(data) {
    return request({
        url: '/login/sendVerify',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        }
    })
}

/**
 * 刷新token
 */
export function referToken(data) {
    return request({
        url: '/login/referToken',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        }
    })
}


/**
 * 发送邮件
 */
export function sendVerifyToEmail(data) {
    return request({
        url: '/login/sendVerifyToEmail',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        }
    })
}

/**
 * 发送邮件
 */
export function verifyEmail(data) {
    return request({
        url: '/login/verifyEmail',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        }
    })
}
